/**
 * 合同列表
 */
import { fetchSqlCode } from "@/api/sql";

const contract = {
  state: {
    contractList: []
  },
  mutations: {
    GET_CONTRACT_LIST(state, payload) {
      state.contractList = payload;
    }
  },
  actions: {
    async getContractList({ commit }) {
      const params = {
        code: "SCWZC061",
        dataowner: "BHTPMS",
        pageSize:9999
      };

      const res = await fetchSqlCode(params);
      if (res.success) {
        commit("GET_CONTRACT_LIST", res.data.rows);
      }
    }
  }
};

export default contract;
